package com.youyou.action;

import com.youyou.entity.Account;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.SessionAttributes;

@Controller
@SessionAttributes("account")
public class TestAction {
    @ModelAttribute("account")
    Account getAccount(){
        return  null;
    }
    @RequestMapping("/kk")
    public String kk(@ModelAttribute("account") Account account) {
        System.out.println("我是核心代码");
        int a=0;
        int b=0;
       // int c=a/b;
        return "kk";
    }
    @RequestMapping("/kk2")
    public  String kk2(){
        System.out.println("我是kk2，我是运行第二个核心代码");
        return "kk2";
    }

}
